<% if @items.count > 0 %>$("#items").append("<%= escape_javascript(render :partial => "file", :collection => @items, :as => :file) %>");<% end %>